#ifndef Singleton_H
#define Singleton_H
template < typename T >
class Singleton
{
public:
	static T* instance()
	{
		if (!ins_) {
			ins_  = new T();
		}
		return ins_;
	}
private:
	static T* ins_;
};

template< typename T >
T* Singleton< T >::ins_ = NULL;

#endif
